import React from 'react';
import { HashRouter, Route, Switch } from 'react-router-dom';
import Home from './Home';
import App from './App';
import Login from './Login';
import Child from './Child';
import BabyTest from './BabyTest';
import Course from './Course';
import My from './My';
import Growth from './Growth';
import ChildDtl from './ChildDtl';
import Forecast from './Forecast';
import Detail from './Detail';
import MyInfo from './MyInfo';
import BabyEdit from './BabyEdit';
import RecGrowth from './RecGrowth';
import MyCourse from './MyCourse';
import MyMsg from './MyMsg';
import MyFav from './MyFav';
import MyOrder from './MyOrder';
import Calendar from './Calendar';
import BabyRadar from './BabyRadar';
import GrowthChart from './GrowthChart';
import BabyRadarChart from './BabyRadarChart';


const BasicRoute = () => (
    <HashRouter>
        <Switch>
            <Route exact path="/" component={Login} />
            <Route exact path="/Growth/:childid" component={Growth} />
            <Route exact path="/Growth/" component={Growth} />
            <Route exact path="/GrowthChart/:childid" component={GrowthChart} />
            <Route exact path="/Home/" component={Home} />
            <Route exact path="/Login" component={Login} />
            <Route exact path="/Child/" component={Child} />
            <Route exact path="/Child/:memberid" component={Child} />
            <Route exact path="/BabyTest/:childid" component={BabyTest} />
            <Route exact path="/BabyTest" component={BabyTest} />
            <Route exact path="/Course" component={Course} />
            <Route exact path="/My" component={My} />
            <Route exact path="/App/:childid" component={App} />
            <Route exact path="/ChildDtl/" component={ChildDtl} />
            <Route exact path="/Forecast/" component={Forecast} />
            <Route exact path="/Detail/:id" component={Detail} />
            <Route exact path="/MyInfo/" component={MyInfo} />
            <Route exact path="/BabyEdit/:childid" component={BabyEdit} />
            <Route exact path="/RecGrowth/:id" component={RecGrowth} />
            <Route exact path="/MyCourse/" component={MyCourse} />
            <Route exact path="/MyMsg/" component={MyMsg} />
            <Route exact path="/MyFav/" component={MyFav} />
            <Route exact path="/MyOrder/" component={MyOrder} />
            <Route exact path="/Calendar/" component={Calendar} />
            <Route exact path="/Calendar/:childid" component={Calendar} />
            <Route exact path="/BabyRadar/" component={BabyRadar} />
            <Route exact path="/BabyRadarChart/:childid" component={BabyRadarChart} />
        </Switch>
    </HashRouter>
);

export default BasicRoute;
// export default connect(
//     state => ({
//         currentUser: state.setCurrentUser,
//         cacheData: state.setCacheData
//     }),setCurrentUserCreater
// )(BasicRoute)